//
//  GJFCaseCollectionViewCell.m
//  Wedding
//
//  Created by 郭静芬 on 2017/1/4.
//  Copyright © 2017年 郭静芬. All rights reserved.
//

#import "GJFCaseCollectionViewCell.h"

@interface GJFCaseCollectionViewCell ()
@property (nonatomic, strong) UIImageView *imageV;
@end

@implementation GJFCaseCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self.imageV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.mas_equalTo(0);
        }];
    }
    return self;
}

- (void)setImgsModel:(GJFImgsModel *)imgsModel {
    _imgsModel = imgsModel;
    [self.imageV sd_setImageWithURL:[NSURL URLWithString:imgsModel.img_url]];
}

- (UIImageView *)imageV {
    if (!_imageV) {
        _imageV = [[UIImageView alloc] init];
        _imageV.contentMode = UIViewContentModeScaleAspectFill;
        _imageV.clipsToBounds = YES;
        _imageV.backgroundColor = [UIColor lightGrayColor];
        [self.contentView addSubview:_imageV];
    }
    return _imageV;
}
@end
